Bug in intOf(real) function

A colleague of mine seems to have found that the "intOf(real)" function does not work correctly for numbers in the range -1.0 < x <= -0.5. For numbers in this range, the result is 0 instead of -1.

Using the following DXL:

"print intOf(x)"

The results are:

x result
1.5 2
1.49 1
1.0 1
0.99 1
0.7 1
0.5 1
0.49 0
0.1 0
0.0 0
-0.1 0
-0.49 0
-0.5 0 (should be -1)
-0.7 0 (should be -1)
-0.99 0 (should be -1)
-1.0 -1
-1.49 -1
-1.5 -2
SystemAdmin - Fri Jul 27 08:27:40 EDT 2012

Re: Bug in intOf(real) function
Mathias Mamsch - Wed Aug 01 17:50:55 EDT 2012

Funny. Now do we need to check +,-,* etc too ;-) Or shall we just not do calculations with DXL ... Very very strange ... Mathias